LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 Copyright 2013 Google Inc | 2 Copyright 2013 Google Inc |
3 | 3 |
4 Licensed under the Apache License, Version 2.0 (the "License"); | 4 Licensed under the Apache License, Version 2.0 (the "License"); |
5 you may not use this file except in compliance with the License. | 5 you may not use this file except in compliance with the License. |
6 You may obtain a copy of the License at | 6 You may obtain a copy of the License at |
7 | 7 |
8 http://www.apache.org/licenses/LICENSE-2.0 | 8 http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 |
10 Unless required by applicable law or agreed to in writing, software | 10 Unless required by applicable law or agreed to in writing, software |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 /// <param name="status">The status of the download.</param> | 71 /// <param name="status">The status of the download.</param> |
72 /// <param name="bytes">The number of bytes received so far.</param> | 72 /// <param name="bytes">The number of bytes received so far.</param> |
73 public DownloadProgress(DownloadStatus status, long bytes) | 73 public DownloadProgress(DownloadStatus status, long bytes) |
74 { | 74 { |
75 Status = status; | 75 Status = status; |
76 BytesDownloaded = bytes; | 76 BytesDownloaded = bytes; |
77 } | 77 } |
78 | 78 |
79 /// <summary>Constructs a new progress instance.</summary> | 79 /// <summary>Constructs a new progress instance.</summary> |
80 /// <param name="exception">An exception which occurred during the d
ownload.</param> | 80 /// <param name="exception">An exception which occurred during the d
ownload.</param> |
81 /// <param name="bytesSent">The number of bytes received before the
exception occurred.</param> | 81 /// <param name="bytes">The number of bytes received before the exce
ption occurred.</param> |
82 public DownloadProgress(Exception exception, long bytes) | 82 public DownloadProgress(Exception exception, long bytes) |
83 { | 83 { |
84 Status = DownloadStatus.Failed; | 84 Status = DownloadStatus.Failed; |
85 BytesDownloaded = bytes; | 85 BytesDownloaded = bytes; |
86 Exception = exception; | 86 Exception = exception; |
87 } | 87 } |
88 | 88 |
89 /// <summary>Gets or sets the status of the download.</summary> | 89 /// <summary>Gets or sets the status of the download.</summary> |
90 public DownloadStatus Status { get; private set; } | 90 public DownloadStatus Status { get; private set; } |
91 | 91 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 235 } |
236 catch (Exception ex) | 236 catch (Exception ex) |
237 { | 237 { |
238 var progress = new DownloadProgress(ex, currentRequestFirstByteP
os); | 238 var progress = new DownloadProgress(ex, currentRequestFirstByteP
os); |
239 UpdateProgress(progress); | 239 UpdateProgress(progress); |
240 return progress; | 240 return progress; |
241 } | 241 } |
242 } | 242 } |
243 } | 243 } |
244 } | 244 } |
LEFT | RIGHT |